{extends admin/layout}

{content}

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title"></h3>

                <div class="box-tools">
                    <div class="input-group input-group-sm" style="width: 150px;">
                        <input type="text" name="table_search" class="form-control pull-right" placeholder="Search">

                        <div class="input-group-btn">
                            <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                        <th>ID</th>
                        <th>文章标题</th>
                        <th>文章分类</th>
                        <th>文章作者</th>
                        <th>文章日期</th>
                        <th>操作</th>
                    </tr>

                    {loop $art in $artslist}
                    <tr>
                        <td>{$art['id']}</td>
                        <td><a href="/article/{$art['id']}" target="_blank">{$art['title']}</a></td>
                        <td>{$art['cate_id']}</td>
                        <td>{$art['user_id']}</td>
                        <td>{$art['pubdate']}</td>
                        <td><a href="/admin/article/{$art['id']}/del" onclick="return confirm('确定删除？');">删除</a> | <a href="/admin/article/{$art['id']}/edit">编辑</a></td>
                    </tr>
                    {/loop}

                </table>
            </div>
            <!-- /.box-body -->
            <div class="box-footer clearfix">
                <ul class="pagination pagination-sm no-margin pull-right">
                    <li><a href="?page=1" title="1">&laquo;</a></li>
                    {loop $num in $pn['list']}
                    <li {if $num==$pn['cur'] }class="active"{/if}><a href="?page={$num}">{$num}</a></li>
                    {/loop}
                    <li><a href="?page={$pn['total']}" title="{$pn['total']}">&raquo;</a></li>
                </ul>
            </div>
        </div>
        <!-- /.box -->
    </div>
</div>

{/content}